call function from store procedure